// ChildView.h : interface of the CChildView class
//

#if !defined(AFX_CHILDVIEW_H__C71A5511_BE3C_4366_9C3F_00ED56CA9078__INCLUDED_)
#define AFX_CHILDVIEW_H__C71A5511_BE3C_4366_9C3F_00ED56CA9078__INCLUDED_

#if _MSC_VER > 1000
#pragma once
#endif // _MSC_VER > 1000

#define TIMERID 0
#define TIMERINTERVAL 500


// CChildView window

class CChildView : public CWnd
{
// Construction
public:
	CChildView();

// Attributes
public:
	int  nBackground[10][20];
    CPoint  ptSquare[7][4][4];
	CPoint ptCurrentSquare[4];
	CPoint ptNextSquare[4];
    BOOL bNextShape;
	BOOL bStart, bPause;
	int nLevel, nScore;
	int nCurrentShape, nCurrentSubShape;
	int nNextShape, nNextSubShape;

	UINT nChangeKey;
	UINT nQuickDownKey;
	UINT nLeftKey;
	UINT nRightKey;
	int nStartLevel;
	int nBackmusicIndex;
	COLORREF colorBack, colorFore;

	CDC dcBackground;
	CBitmap bmpBackground;

// Operations
public:

// Overrides
	// ClassWizard generated virtual function overrides
	//{{AFX_VIRTUAL(CChildView)
	public:
	virtual BOOL Create(LPCTSTR lpszClassName, LPCTSTR lpszWindowName, DWORD dwStyle, const RECT& rect, CWnd* pParentWnd, UINT nID, CCreateContext* pContext = NULL);
	virtual BOOL PreTranslateMessage(MSG* pMsg);
	protected:
	virtual BOOL PreCreateWindow(CREATESTRUCT& cs);
	//}}AFX_VIRTUAL

// Implementation
public:
	virtual ~CChildView();
	void InitGame();
	void Change();
	int Test(CPoint pt);
	int Move(CPoint pt);
	void Search();
	void DrawTip();
	CString Backmusic(int);

	// Generated message map functions
protected:
	//{{AFX_MSG(CChildView)
	afx_msg void OnPaint();
	afx_msg void OnTimer(UINT nIDEvent);
	afx_msg void OnKeyDown(UINT nChar, UINT nRepCnt, UINT nFlags);
	afx_msg BOOL OnEraseBkgnd(CDC* pDC);
	//}}AFX_MSG
	DECLARE_MESSAGE_MAP()
};

//{{AFX_INSERT_LOCATION}}
// Microsoft Visual C++ will insert additional declarations immediately before the previous line.

#endif // !defined(AFX_CHILDVIEW_H__C71A5511_BE3C_4366_9C3F_00ED56CA9078__INCLUDED_)

